<?php
//准备装载数据
	require_once("./includes/configure.php");
	require_once("./includes/database.php");
	$db = Database::Connect();
	$zufang_quyu_array = $db->getConfigurationArray('zufang_quyu');
	$zufang_xianlu_array = $db->getConfigurationArray('zufang_xianlu');
	$zufang_shoujia_array = $db->getConfigurationArray('ershoufang_shoujia');
	$ershoufang_mianji_array = $db->getConfigurationArray('ershoufang_mianji');
	$zufang_fangxing_array = $db->getConfigurationArray('zufang_fangxing');
	$ershoufang_leixing_array = $db->getConfigurationArray('zufang_leixing');

require_once("./includes/func.php");
		$current_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']."?".initUrl($_SERVER['QUERY_STRING']);

	//挨着拼接url
	//第一个问号
	if(!strpos($current_url,"?")){
		$current_url .= '?sj=lx';
	}
?>
<div class="fcklinks">
<div style="height: 8px; *height: 10px;"><span></span></div>
<div class="condition_links2 condition_link2_def" id="panel_apf_id_9">
<div>
<div class="condition_title">区域：</div>
<div class="container" id="apf_id_9_areacontainer">
<?php echo '<a href="'.deleteRepeatVar($current_url,'quyu').'">';
		if(!$_GET['quyu']){
			echo '<strong>不限</strong></a>';
		}else{
			echo '不限</a>';
		}
?><?php
		for($ii=0;$ii<count($zufang_quyu_array);$ii++){
			if($_GET['quyu']==$zufang_quyu_array[$ii]['this_id']){
				echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'"  title="'.$zufang_quyu_array[$ii]['value'].'"><strong>'.$zufang_quyu_array[$ii]['value'].'</strong></a>';
			}else{
				echo '<a href="'.deleteRepeatVar($current_url,'quyu').'&quyu='.$zufang_quyu_array[$ii]['this_id'].'"  title="'.$zufang_quyu_array[$ii]['value'].'">'.$zufang_quyu_array[$ii]['value'].'</a>';
			}
		}
	?>
	<?php
		if($_GET['quyu'] && is_numeric($_GET['quyu'])){
			$zufang_quyu2_array = $db->getConfigurationArray2('zufang_shangquan',$_GET['quyu']);
			//区域下级
			echo '<div style="border: 1px solid #F39800;margin-right: 10px;padding: 0 0 0 6px;">';
				$quyu2_right = false;
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						$quyu2_right = true;
						break;
					}
				}
				if(!$quyu2_right){
					$_GET['quyu2'] = null;
				}
				echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'">';
				if(!$_GET['quyu2']){
					echo '<strong>不限</strong></a>';
				}else{
					echo '不限</a>';
				}
		
				for($ii=0;$ii<count($zufang_quyu2_array);$ii++){
					if($_GET['quyu2']==$zufang_quyu2_array[$ii]['this_id']){
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'"><strong>'.$zufang_quyu2_array[$ii]['value'].'</strong></a>';
					}else{
						echo '<a href="'.deleteRepeatVar($current_url,'quyu2').'&quyu2='.$zufang_quyu2_array[$ii]['this_id'].'"  title="'.$zufang_quyu2_array[$ii]['value'].'">'.$zufang_quyu2_array[$ii]['value'].'</a>';
					}
				}
			echo '</div>';
		}
	?>
	</div>
</div>

<!--<div>
<div class="condition_title">线路：</div>
<div class="container" id="apf_id_9_areacontainer"><strong>不限</strong>
<?php
	for($ii=0;$ii<count($zufang_xianlu_array);$ii++){
		echo '<a href="'.deleteRepeatVar($current_url,'xianlu').'&xianlu='.$zufang_xianlu_array[$ii]['value'].'"  title="'.$zufang_xianlu_array[$ii]['value'].'">'.$zufang_xianlu_array[$ii]['value'].'</a>';
	}
?>
</div>
</div>
-->
<div>
<div class="condition_title">售价：</div>
<div class="containerprice">
<?php echo '<a href="'.deleteRepeatVar($current_url,'shoujia').'">';
	if(!$_GET['shoujia']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_shoujia_array);$ii++){
		if($_GET['shoujia']==$zufang_shoujia_array[$ii]['value']){
			echo '<a style="margin-right:3px;" href="'.deleteRepeatVar($current_url,'shoujia').'&shoujia='.$zufang_shoujia_array[$ii]['value'].'"  title="'.$zufang_shoujia_array[$ii]['C'].'"><strong>'.$zufang_shoujia_array[$ii]['C'].'</strong></a> &nbsp;';
		}else{
			echo '<a style="margin-right:3px;" href="'.deleteRepeatVar($current_url,'shoujia').'&shoujia='.$zufang_shoujia_array[$ii]['value'].'"  title="'.$zufang_shoujia_array[$ii]['C'].'">'.$zufang_shoujia_array[$ii]['C'].'</a> &nbsp;';
		}
	}
?>
</div>
</div>

<div>
<div class="condition_title">面积：</div>
<div class="containerprice">
<?php echo '<a href="'.deleteRepeatVar($current_url,'mianji').'">';
	if(!$_GET['mianji']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($ershoufang_mianji_array);$ii++){
		if($_GET['mianji']==$ershoufang_mianji_array[$ii]['value']){
			echo '<a style="margin-right:3px;" href="'.deleteRepeatVar($current_url,'mianji').'&mianji='.$ershoufang_mianji_array[$ii]['value'].'"  title="'.$ershoufang_mianji_array[$ii]['C'].'"><strong>'.$ershoufang_mianji_array[$ii]['C'].'</strong></a> &nbsp;';
		}else{
			echo '<a style="margin-right:3px;" href="'.deleteRepeatVar($current_url,'mianji').'&mianji='.$ershoufang_mianji_array[$ii]['value'].'"  title="'.$ershoufang_mianji_array[$ii]['C'].'">'.$ershoufang_mianji_array[$ii]['C'].'</a> &nbsp;';
		}
	}
?>

</div>
</div>

<div>
<div class="condition_title">户型：</div>
<div class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'huxing').'">';
	if(!$_GET['huxing']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($zufang_fangxing_array);$ii++){
		if($_GET['huxing']==$zufang_fangxing_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'huxing').'&huxing='.$zufang_fangxing_array[$ii]['value'].'"  title="'.$zufang_fangxing_array[$ii]['C'].'"><strong>'.$zufang_fangxing_array[$ii]['C'].'</strong></a>';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'huxing').'&huxing='.$zufang_fangxing_array[$ii]['value'].'"  title="'.$zufang_fangxing_array[$ii]['C'].'">'.$zufang_fangxing_array[$ii]['C'].'</a>';
		}
	}
?>
</div>
</div>

<div>
<div class="condition_title">类型：</div>
<div class="container">
<?php echo '<a href="'.deleteRepeatVar($current_url,'leixing').'">';
	if(!$_GET['leixing']){
		echo '<strong>不限</strong></a>';
	}else{
		echo '不限</a>';
	}
?>
<?php
	for($ii=0;$ii<count($ershoufang_leixing_array);$ii++){
		if($_GET['leixing']==$ershoufang_leixing_array[$ii]['value']){
			echo '<a href="'.deleteRepeatVar($current_url,'leixing').'&leixing='.$ershoufang_leixing_array[$ii]['value'].'"  title="'.$ershoufang_leixing_array[$ii]['C'].'"><strong>'.$ershoufang_leixing_array[$ii]['C'].'</strong></a>';
		}else{
			echo '<a href="'.deleteRepeatVar($current_url,'leixing').'&leixing='.$ershoufang_leixing_array[$ii]['value'].'"  title="'.$ershoufang_leixing_array[$ii]['C'].'">'.$ershoufang_leixing_array[$ii]['C'].'</a>';
		}
	}
?>
</div>
</div>
</div>
<div class="condition_fake_352"></div>
</div>




<div class="search-result2" style="z-index:99; display:none;">
    <div class="keywords352" id="keywords">
           <form action="" enctype="application/x-www-form-urlencoded" id="ls_form_apf_id_13" class="keywordform">
                <input type="text" maxlength="100" name="kw" id="resultkw" class="kw" value="在结果中搜索" onclick="this.value='';">
                <input type="submit" class="search" value="搜索">
            </form>
            <div class="asline"></div>
            <div id="condmenu">
				<ul class="condul">
					<li class="condlist_tip"><span>更多筛选：</span></li>
					<select name="fangling" style="padding:3px;">
						<option value="">&nbsp;&nbsp;房龄&nbsp;&nbsp;</option>
						<option value="">&nbsp;&nbsp;不限&nbsp;&nbsp;</option>
						<option value="<2">&nbsp;&nbsp;2年内&nbsp;&nbsp;</option>
						<option value="2-5">&nbsp;&nbsp;2-5年&nbsp;&nbsp;</option>
						<option value="5-10">&nbsp;&nbsp;5-10年&nbsp;&nbsp;</option>
						<option value=">10">&nbsp;&nbsp;10年以上&nbsp;&nbsp;</option>
					</select>
					&nbsp;&nbsp;
					<select name="louceng" style="padding:3px;">
						<option value="">&nbsp;&nbsp;楼层&nbsp;&nbsp;</option>
						<option value="">&nbsp;&nbsp;不限&nbsp;&nbsp;</option>
						<option value="<6">&nbsp;&nbsp;6层以下&nbsp;&nbsp;</option>
						<option value="6-12">&nbsp;&nbsp;6-12层&nbsp;&nbsp;</option>
						<option value=">12">&nbsp;&nbsp;12层以上&nbsp;&nbsp;</option>
					</select>
				</ul>
			</div>

</div>
</div>
<?php
$db->close();
?>